// 理解包装对象(类似于Java中的包装类)

const primitive = 'kaifamiao' ;
console.log( primitive , typeof primitive );

// 创建一个String实例并在其中包裹指定的原始值
const wrapper = new String( primitive );
console.log( wrapper , typeof wrapper );

// 获得在String实例中所包裹的原始值
const value = wrapper.valueOf();
console.log( value , typeof value );

console.log( '- - - - - - - - - - - - - - - - - - - - - - - - -' );

let x = new String();
console.log( x , typeof x );

x = new String( null );
console.log( x , typeof x );

x = new String( undefined );
console.log( x , typeof x );

x = new String( 0 );
console.log( x , typeof x );

x = new String( '' );
console.log( x , typeof x );

x = new String( NaN );
console.log( x , typeof x );

x = new String( false );
console.log( x , typeof x );

x = new String( [ ] );
console.log( x , typeof x );

x = new String( { } );
console.log( x , typeof x );
